package com.briup.house;

public class House {
    //id--int name--String phone-String address-String rent-int state-String
    //创建私有变量
    private int id;
    private String name;
    private String phone;
    private String address;
    private int rent;
    private String state;
    //构建无参构造器
    public House(){

    }

    //构建全参构造器
    public House(int id,String name,String phone,String address,int rent,String state){
        this.id=id;
        this.name=name;
        this.phone=phone;
        this.address=address;
        this.rent=rent;
        this.state=state;
    }

    //构建所有的私有属性的getter和setter方法

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getRent() {
        return rent;
    }

    public void setRent(int rend) {
        this.rent = rend;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }


    //toString方法

    @Override
    public String toString() {
        return "House{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", phone='" + phone + '\'' +
                ", address='" + address + '\'' +
                ", rend=" + rent +
                ", state='" + state + '\'' +
                '}';
    }
}
